﻿using System.ComponentModel;
using System.Runtime.CompilerServices;

namespace DotNetUI.Models
{
    /// <summary>
    /// 模型抽象类
    /// </summary>
    public class ModelBase : INotifyPropertyChanged
    {
        /// <summary>
        /// 属性修改事件
        /// </summary>
        public event PropertyChangedEventHandler PropertyChanged;
        /// <summary>
        /// 引发属性修改
        /// </summary>
        /// <param name="name"></param>
        protected void RaisedPropertyChanged([CallerMemberName] string name = null)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
        }
    }
}
